package collection.set;

import java.util.Scanner;
import java.util.TreeMap;

public class Demo07TreeSet {
    public static void main(String[] args) {
        TreeMap<Character, Integer> treemap = new TreeMap<>();
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

        char[] chars = str.toCharArray();
        for (char aChar : chars) {
            if (treemap.containsKey(aChar)) {
                int num = treemap.get(aChar);
                num++;
                treemap.put(aChar, num);
            } else {
                treemap.put(aChar, 1);
            }
        }

        System.out.println(treemap);
    }
}
